<input type="hidden" value="${ctx}" id="basePath">

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>试题修改</title>
    <link href="${ctx}/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="${ctx}/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="${ctx}/css/animate.min.css" rel="stylesheet">
    <link href="${ctx}/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <!--单选框样式-->
    <link href="${ctx}/css/labelauty.css" rel="stylesheet"/>

    <script src="${ctx}/js/jquery.min.js?v=2.1.4"></script>
    <script src="${ctx}/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="${ctx}/js/content.min.js?v=1.0.0"></script>
    <script src="${ctx}/js/plugins/layer/layer.js"></script>
    <script src="${ctx}/js/exam/exam-update.js"></script>
    <#--表单验证-->
    <link href="${ctx}/parsley/parsley.css" rel="stylesheet">
    <script src="${ctx}/parsley/parsley.min.js"></script>
    <style type="text/css">
        .check-image {
            background: url(${ctx}/images/input-unchecked.png) no-repeat;
        }
        /**********************************自定义单选框样式******************************************/
        .rdo {
            height: 34px;
            border: 1px solid #e5e6e7;
        }

        .rdobox {
            border-radius: 0;
            height: 34px;
        }

        /**********************************自定义单选框样式******************************************/

        label {
            margin-bottom: 0px;
        }

        .waring {
            position: fixed;
            top: 18%;
            right: 12%;
            min-height: 80px;
            width: 15%;
        }

        /*去圆角*/
        .nav-tabs li a {
            border-radius: 0 0 0 0;
        }
    </style>
</head>
<body class="gray-bg" onload="getTime(),loadAnswer('#answer-content-complete-ploy')">
<br>
<div class="wrapper wrapper-content animated fadeInUp waring">
    <ul class="notes">
        <li>
            <div style="transform:rotate(0deg);">
                <small id="date-time" style="text-align: left;width: 92%"></small>
                <br>
                <h4>温馨提示</h4>
                <p><span class="glyphicon glyphicon-triangle-right" style="color: limegreen" ></span>试题题干不可与已存在的试题题干相同，系统将会对此进行验证。</p>
                <p><span class="glyphicon glyphicon-triangle-right" style="color: limegreen" ></span>需要增加定位、主治或者答案项时，请点击添加按钮。</p>
                <p><span class="glyphicon glyphicon-triangle-right" style="color: limegreen" ></span>需要减少答案或者主治项时，请点击“叉号”进行删除。</p>
            </div>
        </li>
    </ul>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="tabbable" id="tabs-576364">
                <ul class="nav nav-tabs">
                    <li ><a >问答题</a></li>
                    <li><a >穴位定位</a></li>
                    <li ><a >单项手法</a></li>
                    <li class="active"><a href="#panel-3" data-toggle="tab">成套手法</a></li>
                </ul>
                <br/>
                <div class="tab-content">
                    <div class="tab-pane active" id="panel-1">
                        <form class="form-horizontal" id="table-example">
                            <div class="col-md-9">
                                <input type="hidden" value="${exam.id}" name="id"/>
                                <!--试题分类-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">分类</label>
                                    <div class="col-md-9">
                                        <div class="rdo">
                                            <!--妇科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="14" />
                                            <label class="rdobox" radio-exam-category-val="14" id="radio-exam-complete-ploy-fk">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">妇科</span>
                                            </label>
                                            <!--儿科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="15"/>
                                            <label class="rdobox" radio-exam-category-val="15" id="radio-exam-complete-ploy-ek">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">儿科</span>
                                            </label>
                                            <!--伤科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="13"/>
                                            <label class="rdobox" radio-exam-category-val="13" id="radio-exam-complete-ploy-sk">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">伤科</span>
                                            </label>
                                            <!--内科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="12"/>
                                            <label class="rdobox" radio-exam-category-val="12" id="radio-exam-complete-ploy-nk">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">内科</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            <#include "common.ftl">

                                <!--问答题答案模板-->
                                <div class="form-group "><label class="col-sm-2 control-label">答案</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" name="answer1" value="${exam.answer1}"
                                               parsley-trigger="change" required maxlength="250" data-parsley-maxlength="250"/>
                                    </div>
                                    <label class="col-sm-1 control-label">分值</label>
                                    <div class="col-sm-2">
                                        <input type="text" class="form-control" name="answer1Score" value="${exam.answer1Score}"
                                               parsley-trigger="change" required data-parsley-range="[0,${examParamCompletePloyFSEN.maxAnswerScore}]"/>
                                    </div>
                                    <div class="col-sm-1">
                                        <button class="btn  btn-primary" type="button" onclick="addTerms('#answer-content-complete-ploy',29,'答案项已达上限')">
                                            <i class="glyphicon glyphicon-plus"></i>&nbsp;添加
                                        </button>
                                    </div>
                                </div>
                                <div id="answer-content-complete-ploy"></div>
                                <div class="form-group">
                                    <div class="col-md-6" style="text-align: center;">
                                        <button type="button" onclick="submitForm()" class="btn btn-primary" style="background-color: #008200; color: white;">提交</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" value="<#if exam.answer2 ??>${exam.answer2}</#if>" id="answer2">
<input type="hidden" value="<#if exam.answer2Score ??>${exam.answer2Score}</#if>" id="answer2Score">
<input type="hidden" value="<#if exam.answer3 ??>${exam.answer3}</#if>" id="answer3">
<input type="hidden" value="<#if exam.answer3Score ??>${exam.answer3Score}</#if>" id="answer3Score">
<input type="hidden" value="<#if exam.answer4 ??>${exam.answer4}</#if>" id="answer4">
<input type="hidden" value="<#if exam.answer4Score ??>${exam.answer4Score}</#if>" id="answer4Score">
<input type="hidden" value="<#if exam.answer5 ??>${exam.answer5}</#if>" id="answer5">
<input type="hidden" value="<#if exam.answer5Score ??>${exam.answer5Score}</#if>" id="answer5Score">
<input type="hidden" value="<#if exam.answer6 ??>${exam.answer6}</#if>" id="answer6">
<input type="hidden" value="<#if exam.answer6Score ??>${exam.answer6Score}</#if>" id="answer6Score">
<input type="hidden" value="<#if exam.answer7 ??>${exam.answer7}</#if>" id="answer7">
<input type="hidden" value="<#if exam.answer7Score ??>${exam.answer7Score}</#if>" id="answer7Score">
<input type="hidden" value="<#if exam.answer8 ??>${exam.answer8}</#if>" id="answer8">
<input type="hidden" value="<#if exam.answer8Score ??>${exam.answer8Score}</#if>" id="answer8Score">
<input type="hidden" value="<#if exam.answer9 ??>${exam.answer9}</#if>" id="answer9">
<input type="hidden" value="<#if exam.answer9Score ??>${exam.answer9Score}</#if>" id="answer9Score">
<input type="hidden" value="<#if exam.answer10 ??>${exam.answer10}</#if>" id="answer10">
<input type="hidden" value="<#if exam.answer10Score ??>${exam.answer10Score}</#if>" id="answer10Score">
<input type="hidden" value="<#if exam.answer11 ??>${exam.answer11}</#if>" id="answer11">
<input type="hidden" value="<#if exam.answer11Score ??>${exam.answer11Score}</#if>" id="answer11Score">
<input type="hidden" value="<#if exam.answer12 ??>${exam.answer12}</#if>" id="answer12">
<input type="hidden" value="<#if exam.answer12Score ??>${exam.answer12Score}</#if>" id="answer12Score">
<input type="hidden" value="<#if exam.answer13 ??>${exam.answer13}</#if>" id="answer13">
<input type="hidden" value="<#if exam.answer13Score ??>${exam.answer13Score}</#if>" id="answer13Score">
<input type="hidden" value="<#if exam.answer14 ??>${exam.answer14}</#if>" id="answer14">
<input type="hidden" value="<#if exam.answer14Score ??>${exam.answer14Score}</#if>" id="answer14Score">
<input type="hidden" value="<#if exam.answer15 ??>${exam.answer15}</#if>" id="answer15">
<input type="hidden" value="<#if exam.answer15Score ??>${exam.answer15Score}</#if>" id="answer15Score">
<input type="hidden" value="<#if exam.answer16 ??>${exam.answer16}</#if>" id="answer16">
<input type="hidden" value="<#if exam.answer16Score ??>${exam.answer16Score}</#if>" id="answer16Score">
<input type="hidden" value="<#if exam.answer17 ??>${exam.answer17}</#if>" id="answer17">
<input type="hidden" value="<#if exam.answer17Score ??>${exam.answer17Score}</#if>" id="answer17Score">
<input type="hidden" value="<#if exam.answer18 ??>${exam.answer18}</#if>" id="answer18">
<input type="hidden" value="<#if exam.answer18Score ??>${exam.answer18Score}</#if>" id="answer18Score">
<input type="hidden" value="<#if exam.answer19 ??>${exam.answer19}</#if>" id="answer19">
<input type="hidden" value="<#if exam.answer19Score ??>${exam.answer19Score}</#if>" id="answer19Score">
<input type="hidden" value="<#if exam.answer20 ??>${exam.answer20}</#if>" id="answer20">
<input type="hidden" value="<#if exam.answer20Score ??>${exam.answer20Score}</#if>" id="answer20Score">
<input type="hidden" value="<#if exam.answer21 ??>${exam.answer21}</#if>" id="answer21">
<input type="hidden" value="<#if exam.answer21Score ??>${exam.answer21Score}</#if>" id="answer21Score">
<input type="hidden" value="<#if exam.answer22 ??>${exam.answer22}</#if>" id="answer22">
<input type="hidden" value="<#if exam.answer22Score ??>${exam.answer22Score}</#if>" id="answer22Score">
<input type="hidden" value="<#if exam.answer23 ??>${exam.answer23}</#if>" id="answer23">
<input type="hidden" value="<#if exam.answer23Score ??>${exam.answer23Score}</#if>" id="answer23Score">
<input type="hidden" value="<#if exam.answer24 ??>${exam.answer24}</#if>" id="answer24">
<input type="hidden" value="<#if exam.answer24Score ??>${exam.answer24Score}</#if>" id="answer24Score">
<input type="hidden" value="<#if exam.answer25 ??>${exam.answer25}</#if>" id="answer25">
<input type="hidden" value="<#if exam.answer25Score ??>${exam.answer25Score}</#if>" id="answer25Score">
<input type="hidden" value="<#if exam.answer26 ??>${exam.answer26}</#if>" id="answer26">
<input type="hidden" value="<#if exam.answer26Score ??>${exam.answer26Score}</#if>" id="answer26Score">
<input type="hidden" value="<#if exam.answer27 ??>${exam.answer27}</#if>" id="answer27">
<input type="hidden" value="<#if exam.answer27Score ??>${exam.answer27Score}</#if>" id="answer27Score">
<input type="hidden" value="<#if exam.answer28 ??>${exam.answer28}</#if>" id="answer28">
<input type="hidden" value="<#if exam.answer28Score ??>${exam.answer28Score}</#if>" id="answer28Score">
<input type="hidden" value="<#if exam.answer29 ??>${exam.answer29}</#if>" id="answer29">
<input type="hidden" value="<#if exam.answer29Score ??>${exam.answer29Score}</#if>" id="answer29Score">
<input type="hidden" value="<#if exam.answer30 ??>${exam.answer30}</#if>" id="answer30">
<input type="hidden" value="<#if exam.answer30Score ??>${exam.answer30Score}</#if>" id="answer30Score">
</body>

<script type="text/javascript">
    function submitForm() {
        if (!$('#table-example').parsley().validate()) {
            return;
        }
        var totalScore=getTotalScoreCompletePloyFSEN();
        $("#total-score").val(totalScore)
        if (totalScore>'${examParamCompletePloyFSEN.maxTotalScore}') {
            layer.alert('总分超过上限，请修改!', {
                closeBtn: 0
            });
            return;
        }
        var url = '${ctx}/exam/examManage/update/examCompletePloy';
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: url,
            data: $('#table-example').serialize(),
            success: function (data) {
                if (data.code == 0) {
                    layer.msg(data.msg, {
                        icon: 1,
                        time: 4000
                    });
                }else{
                    layer.alert(data.msg, {
                        closeBtn: 0
                    });
                }
            },
            error: function(data) {
                layer.alert(data.msg, {
                    closeBtn: 0
                });
            }
        });
    }

    function  getTotalScoreCompletePloyFSEN() {
        var answer1Score=$("#table-example").find("input[name='answer1Score']").val();
        var total=0.0;
        total = parseFloat(total) +parseFloat(answer1Score);
        $("input[name='answerScore']").each(function(i){
            total=parseFloat($(this).val())+total;
        });
        return total;
    }

    var validateAnswerText = "parsley-trigger='change' required maxlength='250' data-parsley-maxlength='250' ";
    var validateAnswerScoreText = "parsley-trigger='change' required data-parsley-range='[0,${examParamCompletePloyFSEN.maxAnswerScore}]'"


    function  loadAnswer(divId1) {
        var content;
        var answer2= $("#answer2").val() ;
        var answer2Score=$("#answer2Score").val();
        var answer3= $("#answer3").val() ;
        var answer3Score=$("#answer3Score").val();
        var answer4= $("#answer4").val() ;
        var answer4Score=$("#answer4Score").val();
        var answer5= $("#answer5").val() ;
        var answer5Score=$("#answer5Score").val();
        var answer6= $("#answer6").val() ;
        var answer6Score=$("#answer6Score").val();
        var answer7= $("#answer7").val() ;
        var answer7Score=$("#answer7Score").val();
        var answer8= $("#answer8").val() ;
        var answer8Score=$("#answer8Score").val();
        var answer9= $("#answer9").val() ;
        var answer9Score=$("#answer9Score").val();
        var answer10= $("#answer10").val() ;
        var answer10Score=$("#answer10Score").val();
        var answer11= $("#answer11").val() ;
        var answer11Score=$("#answer11Score").val();
        var answer12= $("#answer12").val() ;
        var answer12Score=$("#answer12Score").val();
        var answer13= $("#answer13").val() ;
        var answer13Score=$("#answer13Score").val();
        var answer14= $("#answer14").val() ;
        var answer14Score=$("#answer14Score").val();
        var answer15= $("#answer15").val() ;
        var answer15Score=$("#answer15Score").val();
        var answer16= $("#answer16").val() ;
        var answer16Score=$("#answer16Score").val();
        var answer17= $("#answer17").val() ;
        var answer17Score=$("#answer17Score").val();
        var answer18= $("#answer18").val() ;
        var answer18Score=$("#answer18Score").val();
        var answer19= $("#answer19").val() ;
        var answer19Score=$("#answer19Score").val();
        var answer20= $("#answer20").val() ;
        var answer20Score=$("#answer20Score").val();
        var answer21= $("#answer21").val() ;
        var answer21Score=$("#answer21Score").val();
        var answer22= $("#answer22").val() ;
        var answer22Score=$("#answer22Score").val();
        var answer23= $("#answer23").val() ;
        var answer23Score=$("#answer23Score").val();
        var answer24= $("#answer24").val() ;
        var answer24Score=$("#answer24Score").val();
        var answer25= $("#answer25").val() ;
        var answer25Score=$("#answer25Score").val();
        var answer26= $("#answer26").val() ;
        var answer26Score=$("#answer26Score").val();
        var answer27= $("#answer27").val() ;
        var answer27Score=$("#answer27Score").val();
        var answer28= $("#answer28").val() ;
        var answer28Score=$("#answer28Score").val();
        var answer29= $("#answer29").val() ;
        var answer29Score=$("#answer29Score").val();
        var answer30= $("#answer30").val() ;
        var answer30Score=$("#answer30Score").val();
        if (answer2 != '' && answer2Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+" class='form-control' name='answer' value='"+answer2+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer2Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer3 != '' && answer3Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer3+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer3Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer4 != '' && answer4Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer4+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer4Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer5 != '' && answer5Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer5+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer5Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer6 != '' && answer6Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer6+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer6Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer7 != '' && answer7Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer7+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer7Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer8 != '' && answer8Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer8+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer8Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer9 != '' && answer9Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer9+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer9Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer10 != '' && answer10Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer10+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer10Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer11 != '' && answer11Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer11+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer11Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer12 != '' && answer12Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer12+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer12Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer13 != '' && answer13Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer13+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer13Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer14 != '' && answer14Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer14+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer14Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer15 != '' && answer15Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer15+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer15Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer16 != '' && answer16Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer16+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer16Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer17 != '' && answer17Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer17+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer17Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer18 != '' && answer18Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer18+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer18Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer19 != '' && answer19Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer19+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer19Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer20 != '' && answer20Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer20+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer20Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer21 != '' && answer21Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer21+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer21Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer22 != '' && answer22Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer22+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer22Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer23 != '' && answer23Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer23+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer23Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer24 != '' && answer24Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer24+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer24Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer25 != '' && answer25Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer25+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer25Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer26 != '' && answer26Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer26+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer26Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer27 != '' && answer27Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer27+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer27Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer28 != '' && answer28Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer28+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer28Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer29 != '' && answer29Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer29+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer29Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
        if (answer30 != '' && answer30Score != '') {
            completePloyFSENCount++;
            content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer' value='"+answer30+"' /></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'  value='"+answer30Score+"'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId1).append(content);
        }
    }

    function addTerms(divId,count,msg) {
        if (completePloyFSENCount > count) {
            // 询问框
            layer.confirm(msg, {
                btn: ["确认"]
                // 按钮
            });
        } else {
            completePloyFSENCount = completePloyFSENCount + 1;
            var content = "<div class='form-group'><div class='col-sm-2'></div><div class='col-sm-6'><input type='text' "+validateAnswerText+"  class='form-control' name='answer'placeholder='请输入答案......'/></div><label class='col-sm-1 control-label' style='padding-left:10px'>分值</label><div class='col-sm-2'><input type='text' "+validateAnswerScoreText+"  class='form-control' name='answerScore'/></div><div class='col-md-1'><i onclick='deleteNewAdd(this,\"completePloyFSENCount\")' class='glyphicon glyphicon-remove' style='margin-left: 80%;margin-top:12%;cursor: pointer;'></i></div></div>";
            $(divId).append(content);
        }
    }
    $(document).ready(function () {
        var categoryId=${exam.categoryId};
        if (categoryId ==12) {
            $("#radio-exam-complete-ploy-nk").removeClass("unchecked");
            $("#radio-exam-complete-ploy-nk").addClass("checked");
            $("#radio-exam-complete-ploy-nk").find(".check-image").css("background", "url(" + basePath + "/images/input-checked.png)");
        }else if (categoryId == 13) {
            $("#radio-exam-complete-ploy-sk").removeClass("unchecked");
            $("#radio-exam-complete-ploy-sk").addClass("checked");
            $("#radio-exam-complete-ploy-sk").find(".check-image").css("background", "url(" + basePath + "/images/input-checked.png)");
        }else if (categoryId == 14) {
            $("#radio-exam-complete-ploy-fk").removeClass("unchecked");
            $("#radio-exam-complete-ploy-fk").addClass("checked");
            $("#radio-exam-complete-ploy-fk").find(".check-image").css("background", "url(" + basePath + "/images/input-checked.png)");
        }else if (categoryId == 15) {
            $("#radio-exam-complete-ploy-ek").removeClass("unchecked");
            $("#radio-exam-complete-ploy-ek").addClass("checked");
            $("#radio-exam-complete-ploy-ek").find(".check-image").css("background", "url(" + basePath + "/images/input-checked.png)");
        }
    });
</script>
</html>
